/*
* MATLAB Compiler: 4.11 (R2009b)
* Date: Sun Jan 08 13:56:54 2012
* Arguments: "-B" "macro_default" "-W" "dotnet:SomeFunctions,Functions,0.0,private" "-d"
* "C:\Users\Nana\Desktop\4th year\First Term\image
* Processing\Projects\MatlabTasks\SomeFunctions\src" "-T" "link:lib" "-v"
* "class{Functions:C:\Users\Nana\Desktop\4th year\First Term\image
* Processing\Projects\Matlab Tasks\LEnhStatistics.m,C:\Users\Nana\Desktop\4th year\First
* Term\image Processing\Projects\Matlab Tasks\LocalEq.m,C:\Users\Nana\Desktop\4th
* year\First Term\image Processing\Projects\Matlab Tasks\MSR_Filter.m}" 
*/
using System;
using System.Reflection;
using System.IO;
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.Utility;
using MathWorks.MATLAB.NET.ComponentData;

#if SHARED
[assembly: System.Reflection.AssemblyKeyFile(@"")]
#endif

namespace SomeFunctions
{
  /// <summary>
  /// The Functions class provides a CLS compliant, MWArray interface to the M-functions
  /// contained in the files:
  /// <newpara></newpara>
  /// C:\Users\Nana\Desktop\4th year\First Term\image Processing\Projects\Matlab
  /// Tasks\LEnhStatistics.m
  /// <newpara></newpara>
  /// C:\Users\Nana\Desktop\4th year\First Term\image Processing\Projects\Matlab
  /// Tasks\LocalEq.m
  /// <newpara></newpara>
  /// C:\Users\Nana\Desktop\4th year\First Term\image Processing\Projects\Matlab
  /// Tasks\MSR_Filter.m
  /// <newpara></newpara>
  /// deployprint.m
  /// <newpara></newpara>
  /// printdlg.m
  /// </summary>
  /// <remarks>
  /// @Version 0.0
  /// </remarks>
  public class Functions : IDisposable
  {
    #region Constructors

    /// <summary internal= "true">
    /// The static constructor instantiates and initializes the MATLAB Component Runtime
    /// instance.
    /// </summary>
    static Functions()
    {
      if (MWMCR.MCRAppInitialized)
      {
        Assembly assembly= Assembly.GetExecutingAssembly();

        string ctfFilePath= assembly.Location;

        int lastDelimiter= ctfFilePath.LastIndexOf(@"\");

        ctfFilePath= ctfFilePath.Remove(lastDelimiter, (ctfFilePath.Length - lastDelimiter));

        string ctfFileName = MCRComponentState.MCC_SomeFunctions_name_data + ".ctf";

        Stream embeddedCtfStream = null;

        String[] resourceStrings = assembly.GetManifestResourceNames();

        foreach (String name in resourceStrings)
        {
          if (name.Contains(ctfFileName))
          {
            embeddedCtfStream = assembly.GetManifestResourceStream(name);
            break;
          }
        }
        mcr= new MWMCR(MCRComponentState.MCC_SomeFunctions_name_data,
                       MCRComponentState.MCC_SomeFunctions_root_data,
                       MCRComponentState.MCC_SomeFunctions_public_data,
                       MCRComponentState.MCC_SomeFunctions_session_data,
                       MCRComponentState.MCC_SomeFunctions_matlabpath_data,
                       MCRComponentState.MCC_SomeFunctions_classpath_data,
                       MCRComponentState.MCC_SomeFunctions_libpath_data,
                       MCRComponentState.MCC_SomeFunctions_mcr_application_options,
                       MCRComponentState.MCC_SomeFunctions_mcr_runtime_options,
                       MCRComponentState.MCC_SomeFunctions_mcr_pref_dir,
                       MCRComponentState.MCC_SomeFunctions_set_warning_state,
                       ctfFilePath, embeddedCtfStream, true);
      }
      else
      {
        throw new ApplicationException("MWArray assembly could not be initialized");
      }
    }


    /// <summary>
    /// Constructs a new instance of the Functions class.
    /// </summary>
    public Functions()
    {
    }


    #endregion Constructors

    #region Finalize

    /// <summary internal= "true">
    /// Class destructor called by the CLR garbage collector.
    /// </summary>
    ~Functions()
    {
      Dispose(false);
    }


    /// <summary>
    /// Frees the native resources associated with this object
    /// </summary>
    public void Dispose()
    {
      Dispose(true);

      GC.SuppressFinalize(this);
    }


    /// <summary internal= "true">
    /// Internal dispose function
    /// </summary>
    protected virtual void Dispose(bool disposing)
    {
      if (!disposed)
      {
        disposed= true;

        if (disposing)
        {
          // Free managed resources;
        }

        // Free native resources
      }
    }


    #endregion Finalize

    #region Methods

    /// <summary>
    /// Provides a single output, 0-input MWArrayinterface to the LEnhStatistics
    /// M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LEnhStatistics()
    {
      return mcr.EvaluateFunction("LEnhStatistics", new MWArray[]{});
    }


    /// <summary>
    /// Provides a single output, 1-input MWArrayinterface to the LEnhStatistics
    /// M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="orgImg">Input argument #1</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LEnhStatistics(MWArray orgImg)
    {
      return mcr.EvaluateFunction("LEnhStatistics", orgImg);
    }


    /// <summary>
    /// Provides a single output, 2-input MWArrayinterface to the LEnhStatistics
    /// M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LEnhStatistics(MWArray orgImg, MWArray WinSize)
    {
      return mcr.EvaluateFunction("LEnhStatistics", orgImg, WinSize);
    }


    /// <summary>
    /// Provides a single output, 3-input MWArrayinterface to the LEnhStatistics
    /// M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <param name="E">Input argument #3</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LEnhStatistics(MWArray orgImg, MWArray WinSize, MWArray E)
    {
      return mcr.EvaluateFunction("LEnhStatistics", orgImg, WinSize, E);
    }


    /// <summary>
    /// Provides a single output, 4-input MWArrayinterface to the LEnhStatistics
    /// M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <param name="E">Input argument #3</param>
    /// <param name="K0">Input argument #4</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LEnhStatistics(MWArray orgImg, MWArray WinSize, MWArray E, MWArray K0)
    {
      return mcr.EvaluateFunction("LEnhStatistics", orgImg, WinSize, E, K0);
    }


    /// <summary>
    /// Provides a single output, 5-input MWArrayinterface to the LEnhStatistics
    /// M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <param name="E">Input argument #3</param>
    /// <param name="K0">Input argument #4</param>
    /// <param name="K1">Input argument #5</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LEnhStatistics(MWArray orgImg, MWArray WinSize, MWArray E, MWArray K0, 
                            MWArray K1)
    {
      return mcr.EvaluateFunction("LEnhStatistics", orgImg, WinSize, E, K0, K1);
    }


    /// <summary>
    /// Provides a single output, 6-input MWArrayinterface to the LEnhStatistics
    /// M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <param name="E">Input argument #3</param>
    /// <param name="K0">Input argument #4</param>
    /// <param name="K1">Input argument #5</param>
    /// <param name="K2">Input argument #6</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LEnhStatistics(MWArray orgImg, MWArray WinSize, MWArray E, MWArray K0, 
                            MWArray K1, MWArray K2)
    {
      return mcr.EvaluateFunction("LEnhStatistics", orgImg, WinSize, E, K0, K1, K2);
    }


    /// <summary>
    /// Provides the standard 0-input MWArray interface to the LEnhStatistics M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LEnhStatistics(int numArgsOut)
    {
      return mcr.EvaluateFunction(numArgsOut, "LEnhStatistics", new MWArray[]{});
    }


    /// <summary>
    /// Provides the standard 1-input MWArray interface to the LEnhStatistics M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="orgImg">Input argument #1</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LEnhStatistics(int numArgsOut, MWArray orgImg)
    {
      return mcr.EvaluateFunction(numArgsOut, "LEnhStatistics", orgImg);
    }


    /// <summary>
    /// Provides the standard 2-input MWArray interface to the LEnhStatistics M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LEnhStatistics(int numArgsOut, MWArray orgImg, MWArray WinSize)
    {
      return mcr.EvaluateFunction(numArgsOut, "LEnhStatistics", orgImg, WinSize);
    }


    /// <summary>
    /// Provides the standard 3-input MWArray interface to the LEnhStatistics M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <param name="E">Input argument #3</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LEnhStatistics(int numArgsOut, MWArray orgImg, MWArray WinSize, 
                              MWArray E)
    {
      return mcr.EvaluateFunction(numArgsOut, "LEnhStatistics", orgImg, WinSize, E);
    }


    /// <summary>
    /// Provides the standard 4-input MWArray interface to the LEnhStatistics M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <param name="E">Input argument #3</param>
    /// <param name="K0">Input argument #4</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LEnhStatistics(int numArgsOut, MWArray orgImg, MWArray WinSize, 
                              MWArray E, MWArray K0)
    {
      return mcr.EvaluateFunction(numArgsOut, "LEnhStatistics", orgImg, WinSize, E, K0);
    }


    /// <summary>
    /// Provides the standard 5-input MWArray interface to the LEnhStatistics M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <param name="E">Input argument #3</param>
    /// <param name="K0">Input argument #4</param>
    /// <param name="K1">Input argument #5</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LEnhStatistics(int numArgsOut, MWArray orgImg, MWArray WinSize, 
                              MWArray E, MWArray K0, MWArray K1)
    {
      return mcr.EvaluateFunction(numArgsOut, "LEnhStatistics", orgImg, WinSize, E, K0, K1);
    }


    /// <summary>
    /// Provides the standard 6-input MWArray interface to the LEnhStatistics M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="WinSize">Input argument #2</param>
    /// <param name="E">Input argument #3</param>
    /// <param name="K0">Input argument #4</param>
    /// <param name="K1">Input argument #5</param>
    /// <param name="K2">Input argument #6</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LEnhStatistics(int numArgsOut, MWArray orgImg, MWArray WinSize, 
                              MWArray E, MWArray K0, MWArray K1, MWArray K2)
    {
      return mcr.EvaluateFunction(numArgsOut, "LEnhStatistics", orgImg, WinSize, E, K0, K1, K2);
    }


    /// <summary>
    /// Provides an interface for the LEnhStatistics function in which the input and
    /// output
    /// arguments are specified as an array of MWArrays.
    /// </summary>
    /// <remarks>
    /// This method will allocate and return by reference the output argument
    /// array.<newpara></newpara>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return</param>
    /// <param name= "argsOut">Array of MWArray output arguments</param>
    /// <param name= "argsIn">Array of MWArray input arguments</param>
    ///
    public void LEnhStatistics(int numArgsOut, ref MWArray[] argsOut, MWArray[] argsIn)
    {
      mcr.EvaluateFunction("LEnhStatistics", numArgsOut, ref argsOut, argsIn);
    }


    /// <summary>
    /// Provides a single output, 0-input MWArrayinterface to the LocalEq M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LocalEq()
    {
      return mcr.EvaluateFunction("LocalEq", new MWArray[]{});
    }


    /// <summary>
    /// Provides a single output, 1-input MWArrayinterface to the LocalEq M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="orgImg">Input argument #1</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LocalEq(MWArray orgImg)
    {
      return mcr.EvaluateFunction("LocalEq", orgImg);
    }


    /// <summary>
    /// Provides a single output, 2-input MWArrayinterface to the LocalEq M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="winSize">Input argument #2</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray LocalEq(MWArray orgImg, MWArray winSize)
    {
      return mcr.EvaluateFunction("LocalEq", orgImg, winSize);
    }


    /// <summary>
    /// Provides the standard 0-input MWArray interface to the LocalEq M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LocalEq(int numArgsOut)
    {
      return mcr.EvaluateFunction(numArgsOut, "LocalEq", new MWArray[]{});
    }


    /// <summary>
    /// Provides the standard 1-input MWArray interface to the LocalEq M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="orgImg">Input argument #1</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LocalEq(int numArgsOut, MWArray orgImg)
    {
      return mcr.EvaluateFunction(numArgsOut, "LocalEq", orgImg);
    }


    /// <summary>
    /// Provides the standard 2-input MWArray interface to the LocalEq M-function.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="orgImg">Input argument #1</param>
    /// <param name="winSize">Input argument #2</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] LocalEq(int numArgsOut, MWArray orgImg, MWArray winSize)
    {
      return mcr.EvaluateFunction(numArgsOut, "LocalEq", orgImg, winSize);
    }


    /// <summary>
    /// Provides an interface for the LocalEq function in which the input and output
    /// arguments are specified as an array of MWArrays.
    /// </summary>
    /// <remarks>
    /// This method will allocate and return by reference the output argument
    /// array.<newpara></newpara>
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return</param>
    /// <param name= "argsOut">Array of MWArray output arguments</param>
    /// <param name= "argsIn">Array of MWArray input arguments</param>
    ///
    public void LocalEq(int numArgsOut, ref MWArray[] argsOut, MWArray[] argsIn)
    {
      mcr.EvaluateFunction("LocalEq", numArgsOut, ref argsOut, argsIn);
    }


    /// <summary>
    /// Provides a single output, 0-input MWArrayinterface to the MSR_Filter M-function.
    /// </summary>
    /// <remarks>
    /// M-Documentation:
    /// [M,N] = size(ImgOrg);
    /// Img_MSR = zeros(M,N);
    /// [H,W,L] = size(ImgOrg);
    /// New = zeros (H,W,L);
    /// </remarks>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray MSR_Filter()
    {
      return mcr.EvaluateFunction("MSR_Filter", new MWArray[]{});
    }


    /// <summary>
    /// Provides a single output, 1-input MWArrayinterface to the MSR_Filter M-function.
    /// </summary>
    /// <remarks>
    /// M-Documentation:
    /// [M,N] = size(ImgOrg);
    /// Img_MSR = zeros(M,N);
    /// [H,W,L] = size(ImgOrg);
    /// New = zeros (H,W,L);
    /// </remarks>
    /// <param name="ImgOrg">Input argument #1</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray MSR_Filter(MWArray ImgOrg)
    {
      return mcr.EvaluateFunction("MSR_Filter", ImgOrg);
    }


    /// <summary>
    /// Provides a single output, 2-input MWArrayinterface to the MSR_Filter M-function.
    /// </summary>
    /// <remarks>
    /// M-Documentation:
    /// [M,N] = size(ImgOrg);
    /// Img_MSR = zeros(M,N);
    /// [H,W,L] = size(ImgOrg);
    /// New = zeros (H,W,L);
    /// </remarks>
    /// <param name="ImgOrg">Input argument #1</param>
    /// <param name="SigmaV">Input argument #2</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray MSR_Filter(MWArray ImgOrg, MWArray SigmaV)
    {
      return mcr.EvaluateFunction("MSR_Filter", ImgOrg, SigmaV);
    }


    /// <summary>
    /// Provides a single output, 3-input MWArrayinterface to the MSR_Filter M-function.
    /// </summary>
    /// <remarks>
    /// M-Documentation:
    /// [M,N] = size(ImgOrg);
    /// Img_MSR = zeros(M,N);
    /// [H,W,L] = size(ImgOrg);
    /// New = zeros (H,W,L);
    /// </remarks>
    /// <param name="ImgOrg">Input argument #1</param>
    /// <param name="SigmaV">Input argument #2</param>
    /// <param name="WeightV">Input argument #3</param>
    /// <returns>An MWArray containing the first output argument.</returns>
    ///
    public MWArray MSR_Filter(MWArray ImgOrg, MWArray SigmaV, MWArray WeightV)
    {
      return mcr.EvaluateFunction("MSR_Filter", ImgOrg, SigmaV, WeightV);
    }


    /// <summary>
    /// Provides the standard 0-input MWArray interface to the MSR_Filter M-function.
    /// </summary>
    /// <remarks>
    /// M-Documentation:
    /// [M,N] = size(ImgOrg);
    /// Img_MSR = zeros(M,N);
    /// [H,W,L] = size(ImgOrg);
    /// New = zeros (H,W,L);
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] MSR_Filter(int numArgsOut)
    {
      return mcr.EvaluateFunction(numArgsOut, "MSR_Filter", new MWArray[]{});
    }


    /// <summary>
    /// Provides the standard 1-input MWArray interface to the MSR_Filter M-function.
    /// </summary>
    /// <remarks>
    /// M-Documentation:
    /// [M,N] = size(ImgOrg);
    /// Img_MSR = zeros(M,N);
    /// [H,W,L] = size(ImgOrg);
    /// New = zeros (H,W,L);
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="ImgOrg">Input argument #1</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] MSR_Filter(int numArgsOut, MWArray ImgOrg)
    {
      return mcr.EvaluateFunction(numArgsOut, "MSR_Filter", ImgOrg);
    }


    /// <summary>
    /// Provides the standard 2-input MWArray interface to the MSR_Filter M-function.
    /// </summary>
    /// <remarks>
    /// M-Documentation:
    /// [M,N] = size(ImgOrg);
    /// Img_MSR = zeros(M,N);
    /// [H,W,L] = size(ImgOrg);
    /// New = zeros (H,W,L);
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="ImgOrg">Input argument #1</param>
    /// <param name="SigmaV">Input argument #2</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] MSR_Filter(int numArgsOut, MWArray ImgOrg, MWArray SigmaV)
    {
      return mcr.EvaluateFunction(numArgsOut, "MSR_Filter", ImgOrg, SigmaV);
    }


    /// <summary>
    /// Provides the standard 3-input MWArray interface to the MSR_Filter M-function.
    /// </summary>
    /// <remarks>
    /// M-Documentation:
    /// [M,N] = size(ImgOrg);
    /// Img_MSR = zeros(M,N);
    /// [H,W,L] = size(ImgOrg);
    /// New = zeros (H,W,L);
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return.</param>
    /// <param name="ImgOrg">Input argument #1</param>
    /// <param name="SigmaV">Input argument #2</param>
    /// <param name="WeightV">Input argument #3</param>
    /// <returns>An Array of length "numArgsOut" containing the output
    /// arguments.</returns>
    ///
    public MWArray[] MSR_Filter(int numArgsOut, MWArray ImgOrg, MWArray SigmaV, MWArray 
                          WeightV)
    {
      return mcr.EvaluateFunction(numArgsOut, "MSR_Filter", ImgOrg, SigmaV, WeightV);
    }


    /// <summary>
    /// Provides an interface for the MSR_Filter function in which the input and output
    /// arguments are specified as an array of MWArrays.
    /// </summary>
    /// <remarks>
    /// This method will allocate and return by reference the output argument
    /// array.<newpara></newpara>
    /// M-Documentation:
    /// [M,N] = size(ImgOrg);
    /// Img_MSR = zeros(M,N);
    /// [H,W,L] = size(ImgOrg);
    /// New = zeros (H,W,L);
    /// </remarks>
    /// <param name="numArgsOut">The number of output arguments to return</param>
    /// <param name= "argsOut">Array of MWArray output arguments</param>
    /// <param name= "argsIn">Array of MWArray input arguments</param>
    ///
    public void MSR_Filter(int numArgsOut, ref MWArray[] argsOut, MWArray[] argsIn)
    {
      mcr.EvaluateFunction("MSR_Filter", numArgsOut, ref argsOut, argsIn);
    }


    /// <summary>
    /// This method will cause a MATLAB figure window to behave as a modal dialog box.
    /// The method will not return until all the figure windows associated with this
    /// component have been closed.
    /// </summary>
    /// <remarks>
    /// An application should only call this method when required to keep the
    /// MATLAB figure window from disappearing.  Other techniques, such as calling
    /// Console.ReadLine() from the application should be considered where
    /// possible.</remarks>
    ///
    public void WaitForFiguresToDie()
    {
      mcr.WaitForFiguresToDie();
    }



    #endregion Methods

    #region Class Members

    private static MWMCR mcr= null;

    private bool disposed= false;

    #endregion Class Members
  }
}
